#!/usr/bin/env python
# -*- coding: utf-8 -*-

# @Time     :2020/10/07
# @Author   :Changshu
# @File     :practice_225.py

# 225. 用队列实现栈

class MyStack:
	def __init__(self):
		# Initialize your data structure here.
		self.data = []

	def push(self, x: int) -> None:
		"""
		    Push element x onto stack.
		"""
		self.data.append(x)

	def empty(self) -> bool:
		if len(self.data) == 0:
			return True
		return False

	def pop(self) -> int:
		if self.empty():
			return None
		return self.data.pop()

	def top(self) -> int:
		if self.empty():
			return None
		return self.data[-1]
